package com.cyf.plc.di.module

import android.app.Application
import com.cyf.plc.data.local.PlcDatabase
import dagger.Module
import dagger.Provides
import javax.inject.Singleton

@Module
class PlcDatabaseModule {

    @Singleton
    @Provides
    fun provideDatabase(application: Application) = PlcDatabase.getInstance(application)

    @Singleton
    @Provides
    fun provideFloorsDao(database: PlcDatabase) = database.getFloorDao()
}